<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ws2811.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../vesc.jpg"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ws2811.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../da/d84/ws2811_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright 2012-2014 Benjamin Vedder benjamin@vedder.se</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    This program is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    */</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ws2811.h</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *  Created on: 14 jul 2013</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *      Author: benjamin</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef WS2811_H_</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define WS2811_H_</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../df/df4/conf__general_8h.html">conf_general.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">// Hex color definitions</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#aba2a7fe77a7501e5844370eec0185207">   32</a></span>&#160;<span class="preprocessor">#define COLOR_BLACK          0x000000</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a9b44987ffdc2af19b635206b94334b69">   33</a></span>&#160;<span class="preprocessor">#define COLOR_WHITE          0xFFFFFF</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a23c70d699a5a775bc2e1ebeb8603f630">   35</a></span>&#160;<span class="preprocessor">#define COLOR_BLUE           0x0000FF</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#afc9149f5de51bd9ac4f5ebbfa153f018">   36</a></span>&#160;<span class="preprocessor">#define COLOR_GREEN          0x00FF00</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#ad86358bf19927183dd7b4ae215a29731">   37</a></span>&#160;<span class="preprocessor">#define COLOR_RED            0xFF0000</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#ac353684a9f431de76b1ea9443265d917">   39</a></span>&#160;<span class="preprocessor">#define COLOR_NAVY           0x000080</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a106afbb2db8713898001bd3f18cd43c9">   40</a></span>&#160;<span class="preprocessor">#define COLOR_DARKBLUE       0x00008B</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a60f33bc1f24aede8bbf12d47f90f982e">   41</a></span>&#160;<span class="preprocessor">#define COLOR_DARKGREEN      0x006400</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#acf2525b31291a9f1e17788dc0ac2e4e2">   42</a></span>&#160;<span class="preprocessor">#define COLOR_DARKCYAN       0x008B8B</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a82573859711fce56f1aa0a76b18a9b18">   43</a></span>&#160;<span class="preprocessor">#define COLOR_CYAN           0x00FFFF</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#aa777bae5d7f4119da57cc77b369498f8">   44</a></span>&#160;<span class="preprocessor">#define COLOR_TURQUOISE      0x40E0D0</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#acbbfcbfff0ce3663a9594782355adfe8">   45</a></span>&#160;<span class="preprocessor">#define COLOR_INDIGO         0x4B0082</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a48502c1e5a39510f7e7d1c1d81d8bfa6">   46</a></span>&#160;<span class="preprocessor">#define COLOR_DARKRED        0x800000</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a3d28ef5dfbf3f7af50d52bff322a6c01">   47</a></span>&#160;<span class="preprocessor">#define COLOR_OLIVE          0x808000</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a3aaf3b0287d26dfb6ecb3b1c46e950c8">   48</a></span>&#160;<span class="preprocessor">#define COLOR_GRAY           0x808080</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a7641e782da2c9c90c431d23eaeb4d07c">   49</a></span>&#160;<span class="preprocessor">#define COLOR_SKYBLUE        0x87CEEB</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a126341d69d5062eae296520e98102e8c">   50</a></span>&#160;<span class="preprocessor">#define COLOR_BLUEVIOLET     0x8A2BE2</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#ad587a2ba9bfcb1e32be24b61c932853b">   51</a></span>&#160;<span class="preprocessor">#define COLOR_LIGHTGREEN     0x90EE90</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#aed9c3d88c1a2cc350effa4b1b7ed7e36">   52</a></span>&#160;<span class="preprocessor">#define COLOR_DARKVIOLET     0x9400D3</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a8499854117dbd871bb9cbc231609d30f">   53</a></span>&#160;<span class="preprocessor">#define COLOR_YELLOWGREEN    0x9ACD32</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a928e144dbbe4316dbb854245c7e38de7">   54</a></span>&#160;<span class="preprocessor">#define COLOR_BROWN          0xA52A2A</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a29b8c0b35303d54c7b8159169ed858a6">   55</a></span>&#160;<span class="preprocessor">#define COLOR_DARKGRAY       0xA9A9A9</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a95aa4609203117b5b3a3ee463f125cdb">   56</a></span>&#160;<span class="preprocessor">#define COLOR_SIENNA         0xA0522D</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a04ee62baabfde3568b5d7a7293b4bc70">   57</a></span>&#160;<span class="preprocessor">#define COLOR_LIGHTBLUE      0xADD8E6</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#af44aaf067cf7d36a10185c238e54e43c">   58</a></span>&#160;<span class="preprocessor">#define COLOR_GREENYELLOW    0xADFF2F</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a222ba410c8d99aaacadef5ecd4d7952e">   59</a></span>&#160;<span class="preprocessor">#define COLOR_SILVER         0xC0C0C0</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a2b8184cd58de122a35084154c001aef0">   60</a></span>&#160;<span class="preprocessor">#define COLOR_LIGHTGREY      0xD3D3D3</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a51a701618b761ba6bc0838990f23476d">   61</a></span>&#160;<span class="preprocessor">#define COLOR_LIGHTCYAN      0xE0FFFF</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a074ac45312467d6ea439637095c01925">   62</a></span>&#160;<span class="preprocessor">#define COLOR_VIOLET         0xEE82EE</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a4c4a2b6211a66402e456567696de968d">   63</a></span>&#160;<span class="preprocessor">#define COLOR_AZUR           0xF0FFFF</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a880af07c3a5d4c5e07d1f4acb62d3350">   64</a></span>&#160;<span class="preprocessor">#define COLOR_BEIGE          0xF5F5DC</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a8deb0beccea721b35bdb1b4f7264fe75">   65</a></span>&#160;<span class="preprocessor">#define COLOR_MAGENTA        0xFF00FF</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#aa9e11befee9feb2056a5ed654ffb9745">   66</a></span>&#160;<span class="preprocessor">#define COLOR_TOMATO         0xFF6347</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a8d66c272228e3ae3e88df54b665deab8">   67</a></span>&#160;<span class="preprocessor">#define COLOR_GOLD           0xFFD700</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#aef75f616b9a3fdb10d38395dfb996873">   68</a></span>&#160;<span class="preprocessor">#define COLOR_ORANGE         0xFFA500</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a38488885f4be48809b4343678aa3ac6f">   69</a></span>&#160;<span class="preprocessor">#define COLOR_SNOW           0xFFFAFA</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="../../da/d84/ws2811_8h.html#a4534b577b74a58b0f4b7be027af664e0">   70</a></span>&#160;<span class="preprocessor">#define COLOR_YELLOW         0xFFFF00</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">// Functions</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../da/d84/ws2811_8h.html#aa764abb440f1d5551cce16147a42f1bf">ws2811_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../da/d84/ws2811_8h.html#a1071707c38080713101dc9c216dc78ae">ws2811_set_led_color</a>(<span class="keywordtype">int</span> led, uint32_t color);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;uint32_t <a class="code" href="../../da/d84/ws2811_8h.html#a7c4a5d2e94b4276d2cb30c8816bb2d98">ws2811_get_led_color</a>(<span class="keywordtype">int</span> led);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../da/d84/ws2811_8h.html#a0cf9f7b146d8d61fb2e44653abcf4d1e">ws2811_all_off</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../da/d84/ws2811_8h.html#a26fefc859537f34dba0541d2beebacac">ws2811_set_all</a>(uint32_t color);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* WS2811_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ws2811_8h_html_a26fefc859537f34dba0541d2beebacac"><div class="ttname"><a href="../../da/d84/ws2811_8h.html#a26fefc859537f34dba0541d2beebacac">ws2811_set_all</a></div><div class="ttdeci">void ws2811_set_all(uint32_t color)</div><div class="ttdef"><b>Definition:</b> ws2811.c:210</div></div>
<div class="ttc" id="ws2811_8h_html_a0cf9f7b146d8d61fb2e44653abcf4d1e"><div class="ttname"><a href="../../da/d84/ws2811_8h.html#a0cf9f7b146d8d61fb2e44653abcf4d1e">ws2811_all_off</a></div><div class="ttdeci">void ws2811_all_off(void)</div><div class="ttdef"><b>Definition:</b> ws2811.c:198</div></div>
<div class="ttc" id="ws2811_8h_html_a7c4a5d2e94b4276d2cb30c8816bb2d98"><div class="ttname"><a href="../../da/d84/ws2811_8h.html#a7c4a5d2e94b4276d2cb30c8816bb2d98">ws2811_get_led_color</a></div><div class="ttdeci">uint32_t ws2811_get_led_color(int led)</div><div class="ttdef"><b>Definition:</b> ws2811.c:190</div></div>
<div class="ttc" id="ws2811_8h_html_aa764abb440f1d5551cce16147a42f1bf"><div class="ttname"><a href="../../da/d84/ws2811_8h.html#aa764abb440f1d5551cce16147a42f1bf">ws2811_init</a></div><div class="ttdeci">void ws2811_init(void)</div><div class="ttdef"><b>Definition:</b> ws2811.c:47</div></div>
<div class="ttc" id="conf__general_8h_html"><div class="ttname"><a href="../../df/df4/conf__general_8h.html">conf_general.h</a></div></div>
<div class="ttc" id="ws2811_8h_html_a1071707c38080713101dc9c216dc78ae"><div class="ttname"><a href="../../da/d84/ws2811_8h.html#a1071707c38080713101dc9c216dc78ae">ws2811_set_led_color</a></div><div class="ttdeci">void ws2811_set_led_color(int led, uint32_t color)</div><div class="ttdef"><b>Definition:</b> ws2811.c:172</div></div>
</div><!-- fragment --></div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://github.com/joshdellay" target="_new">Josh Dellay</a>